package com.naiterui.ehp.bp.bo.b2c.cms;

import java.util.List;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

import lombok.Data;

import io.swagger.annotations.ApiModelProperty;

@Data
public class CmsSkuBO implements java.io.Serializable {
    private static final long serialVersionUID = 4466900075046958918L;
    /**
     * 主键
     */
    @ApiModelProperty(value = "主键")
    private Long id;

    /**
     * 商品id
     */
    @NotNull(message = "商品ID不能为null")
    @ApiModelProperty(value = "商品id")
    private Long productId;

    /**
     * SKU编号
     */
    @ApiModelProperty(value = "SKU编号")
    private String number;

    @NotNull(message = "是否默认不能为null")
    @ApiModelProperty(value = "是否默认  0：是  1：否")
    private Integer defaultSku;

    /**
     * sku名称（商品名 通用名 规格）
     */
    @NotEmpty(message = "sku名称不能为null")
    @ApiModelProperty(value = "sku名称（商品名 通用名 规格）")
    private String name;

    /**
     * 包装规格(0.25g*12片*2板/盒)
     */
    @NotEmpty(message = "包装规格不能为null")
    @ApiModelProperty(value = "包装规格(0.25g*12片*2板/盒)")
    private String packingSpec;

    /**
     * 单位包装规格数量（24）
     */
    @NotNull(message = "单位包装规格数量不能为null")
    @ApiModelProperty(value = "单位包装规格数量（24")
    private Integer packingUnitNumber;

    /**
     * 规格单位（板，包，瓶）
     */
    @NotEmpty(message = "规格单位不能为null")
    @ApiModelProperty(value = "规格单位（板，包，瓶）")
    private String specUnit;

    /**
     * 规格值
     */
    @ApiModelProperty(value = "规格值")
    private Integer specValue;

    /**
     * 售价(分)
     */
    @NotNull(message = "售价不能为null")
    @Min(value = 0, message = "售价不能小于0")
    @ApiModelProperty(value = "售价")
    private Integer salePrice;

    /**
     * 重量(克)
     */
    @NotNull(message = "重量不能为null")
    @Min(value = 0, message = "重量不能小于0")
    @ApiModelProperty(value = "重量")
    private Integer weight;

    /**
     * 状态(0:下架，1:正常)
     */
    @ApiModelProperty(value = "状态(0:下架，1:正常)")
    private Integer status;

    @ApiModelProperty(value = "图片列表")
    private List<String> images;

    @ApiModelProperty(value = "库存预警值")
    private Integer inventoryWarningValue;

    @ApiModelProperty(value = "处方流转平台基础信息商品ID")
    private Long thirdId;

    @Override
    public String toString() {
        return "CmsSkuBO{" +
            "id=" + id +
            ", productId=" + productId +
            ", number='" + number + '\'' +
            ", defaultSku=" + defaultSku +
            ", name='" + name + '\'' +
            ", packingSpec='" + packingSpec + '\'' +
            ", packingUnitNumber=" + packingUnitNumber +
            ", specUnit='" + specUnit + '\'' +
            ", specValue=" + specValue +
            ", salePrice=" + salePrice +
            ", weight=" + weight +
            ", status=" + status +
            ", images=" + images +
            ", inventoryWarningValue=" + inventoryWarningValue +
            '}';
    }
}
